home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / getdata.doc < prev    next >
Text File  |  1986-12-28  |  969b  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 get_data_adr -- get a data item address
  5.  
  6.         SYNOPSIS
  7.                 void get_data_adr(item, offset, segment);
  8.                 int *item;         name of data item
  9.                 int *offset;       destination of offset value
  10.                 int *segment;      destination of segment value
  11.  
  12.  
  13.         DESCRIPTION
  14.         This function is used to get the absolute segment and offset
  15.         values for the address of a data item within a program.
  16.         It is useful for installing interrupt handlers and
  17.         interfacing to assembly language modules.
  18.  
  19.  
  20.  
  21.         EXAMPLE
  22.  
  23.                int somenumber;
  24.  
  25.                main() {
  26.                  int segment, offset;
  27.                  get_data_adr(&somenumber, &offset, &segment);
  28.                  printf("Address is %x:%x\n", segment, offset);
  29.                  }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler
  39.